<template>
 <div>
   <!-- 小标签 -->
    <div class="index_small_tab">
      <div v-for='(item,index) in type.imgUrls' :key='index' class="small_box_index">
        <div class="index_small_box" @click="gotype(item,index)">
          <img :src="item.src" alt="">
          <div>{{item.substance}}</div>
        </div>
      </div>
    </div>
 </div>
</template>
<script>
export default {
  props: ['type'],
  created () {
    if (this.type.stylesType === 1) {
      this.type.imgUrls.splice(this.type.imgUrls.length - 1, 1)
    }
    if (this.type.stylesType === 2) {
      this.type.imgUrls.splice(this.type.imgUrls.length - 1, 1)
      this.type.imgUrls.splice(this.type.imgUrls.length - 1, 1)
    }
  },
  data () {
    return {
      classification: [
        {
          title: 1,
          cover: `http://o6wndwjxn.qnssl.com/0cb6e201809281134184635.jpg`
        }
      ]
    }
  },
  methods: {
    gotype (item, index) {
      this.$emit('link', item, index)
    }
  },
  components: {

  }
}
</script>

<style scoped>
  @import '../../assets/css/index.css'
</style>
